package com.yzc.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzc.mapper.RoleMapper;
import com.yzc.model.entity.system.RoleBean;
import com.yzc.model.entity.system.roleMenu;
import com.yzc.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, RoleBean> implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    /**
     * 获取用户数据
     *
     * @return
     */
    public List<RoleBean> loadRoleList() {
        LambdaQueryWrapper<RoleBean> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(RoleBean::getIsDeleted, 0);
        return roleMapper.selectList(queryWrapper);
    }

    public List<roleMenu> loadRoleMenus(RoleBean roleBean) {
        return roleMapper.loadRoleMenus(roleBean);
    }


}
